package com.letoken.platform.app.job;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.letoken.platform.app.service.AppFundDetailService;
import com.letoken.platform.app.service.AppFundInfoService;
import com.letoken.platform.app.service.AppUserLampService;
import com.letoken.platform.app.service.AppUserWalletService;
import com.letoken.platform.pub.enums.LetokenTokenTypeEnum;
import com.letoken.platform.pub.enums.TokenTransactionTypeEnum;
import com.letoken.platform.repo.admin.dao.AdminFundConfigMapper;
import com.letoken.platform.repo.admin.po.AdminFundConfig;
import com.letoken.platform.repo.app.dao.*;
import com.letoken.platform.repo.app.po.AppFundDetail;
import com.letoken.platform.repo.app.po.AppFundInfo;
import com.letoken.platform.repo.helper.CalculateConsumerValue;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;

@Component
@Slf4j
public class FundCapJob {
    @Resource
    private AppFundInfoMapper appFundInfoMapper;


    @Autowired
    private AppFundDetailService appFundDetailService;


    @Autowired
    RabbitTemplate rabbitTemplate;

    @Autowired
    CalculateConsumerValue calculateConsumerValue;
    @Autowired
    AppFundInfoService appFundInfoService;

    @Autowired
    AppUserLampService appUserLampService;

    @Autowired
    AppUserWalletService appUserWalletService;
    @XxlJob("fundCapJob")
    public  void fundCapJob() {
        appFundInfoService.fundCapJob();
    }
}
